<?php 
//session_start(); 


session_start(); 



$pos = strpos($_SERVER['SERVER_NAME'], 'freeteam.streams.com');
if($pos === false){
	include_once('../includes/classes/config.inc.php');
}else{
	include_once('../includes/classes/config-local.inc.php');
}

include_once(abspath.'/includes/classes/class.database.php');
include_once(abspath.'/includes/classes/securesession.class.php');
 if($p != 'login'){ 
  $ss = new SecureSession();
  $ss->check_browser = true;
  $ss->check_ip_blocks = 2;
  $ss->secure_word = 'wiistream_';
  $ss->regenerate_id = true;
  
  if (!$ss->Check() || !isset($_SESSION['logged_in_admin']))
  {
    header('Location: ../members.php?p=login');

  }
}

if ($p == 'login'){

if (isset($_SESSION['logged_in_admin']))
 { header('Location: index.php?p=streams');}

}
include_once(abspath.'/includes/funcs/sitefunc.php');
$db = new Database(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE); 
$db->connect();




include_once(theme.'/top_home_admin.php');
//include_once(theme.'/siteadmin/center_home.php');
include_once(theme.'/siteadmin/add_channel.php');

include_once(theme."/bottom_home.php");
$db->close();
?>

